﻿<%@ Page Title="" Language="C#" MasterPageFile="Site1.Master" AutoEventWireup="true" CodeBehind="SponsorList.aspx.cs" Inherits="RaceList.Admin.Relay.SponsorList" %>
<%@ Import Namespace="RaceList.Admin.Relay" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MyContentPlaceHolder" runat="server">
    <h2 class="title">
        <asp:Image ID="LogImage" runat="server" ImageUrl="/admin/images/icon_settings.png" />
        <asp:Label ID="LogLabel" runat="server" Text="赞助商管理">
        </asp:Label>
    </h2>
    <table width="100%">
        <tr>
            <td style="width: 250px;">
                <asp:Button CssClass="btnCss" runat="server" ID="btnUp" Text="刷新" OnClick="btnRefresh_Click"></asp:Button>&nbsp;
                <input class="btnCss" type="button" onclick="btnAd()" id="btnAdd" value="发布赞助商" />
            </td>
            <td style="color: Red;">
                <asp:Literal runat="server" ID="Message"></asp:Literal>
            </td>
        </tr>
    </table>
    <div>
        <asp:GridView ID="gvList" CssClass="List" runat="server" AutoGenerateColumns="False" Width="100%"
            EmptyDataText="暂无赞助商数据" OnRowCommand="gvList_RowCommand" OnRowDataBound="gvList_RowDataBound">
            <RowStyle Height="36px" />
            <Columns>
                <asp:TemplateField HeaderText="ID">
                    <HeaderStyle Width="36px" />
                    <ItemTemplate>
                        <%# Eval("Id") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="名称">
                    <ItemTemplate>
                        <a href="SponsorEdit.aspx?ID=<%# Eval("Id") %>" style="text-decoration: none;"><%# Eval("Name") %></a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="发布时间">
                    <ItemTemplate>
                        <%# Eval("addTime") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderStyle Width="200px" />
                    <ItemTemplate>
                        <asp:LinkButton ID="CheckStatus" runat="server" CommandName="CheckStatus"
                            Text='<%# CommonHelp.CheckStatus(Eval("status")) %>' CommandArgument='<%# Eval("Id") %>'></asp:LinkButton>&nbsp;|&nbsp;
                        <a href="SponsorEdit.aspx?ID=<%# Eval("Id") %>">编辑</a>&nbsp;|&nbsp;
                        <asp:LinkButton ID="btnDel" runat="server" CommandName="btnDel"
                            Text="删除" CommandArgument='<%# Eval("Id") %>'></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <asp:Panel ID="LinkListPanel" runat="server" Width="100%">
        </asp:Panel>
    </div>
    <script type="text/jscript" language="javascript">
        function btnAd() {
            window.location.href = "SponsorAdd.aspx";
        }
    </script>
</asp:Content>
